﻿using System;

namespace POP.Pop3.Exceptions
{
	// This is the base exception for all <see cref="Pop3Client"/> exceptions.
	public abstract class PopClientException : Exception
	{
		// Creates a PopClientException with the given message and InnerException
		protected PopClientException(string message, Exception innerException)
			: base(message, innerException)
		{
			if(message == null)
				throw new ArgumentNullException("message");

			if(innerException == null)
				throw new ArgumentNullException("innerException");
		}

		// Creates a PopClientException with the given message
		protected PopClientException(string message)
			: base(message)
		{
			if (message == null)
				throw new ArgumentNullException("message");
		}
	}
}